package com.lch.designpattern.strategy.pay;

import com.lch.designpattern.strategy.pay.payport.Payment;

import lombok.Builder;
import lombok.Data;

/**
 * @author: liuchenhui
 * @create: 2019-06-23 12:52
 **/
@Data
@Builder
public class Order {
    private String uid;
    private int amount;
    private String name;

    MsgResult pay() {
        Payment pay = PayFactory.getPay(name);
        MsgResult msgResult = pay.pay(uid, amount);
        return msgResult;
    }
}
